﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data.Entity.ModelConfiguration;
using BPM.Entity;

namespace BPM.Service.Mappings
{
	internal class MaterialDefinitionCategoryConfiguration : EntityConfiguration<MaterialDefinitionCategory>
	{
		public MaterialDefinitionCategoryConfiguration()
		{
			this.HasOptional(m => m.ParentCategory)
				.WithMany(p => p.SubCategoryList)
				.HasConstraint((mSon, mParent) => mSon.ParentCategoryId == mParent.Id);
		}
	}
}
